Extension Table Built-ins for Prolog

نویسندگان

  • Changguan Fan
  • Suzanne W. Dietrich
چکیده

The ET* algorithm is a complete evaluation strategy for Datalog programs, which are logic programs without function symbols. The ET* algorithm uses extension tables and depth-first iterative deepening to provide the evaluation of pure function-free logic programs as declarative specifications. Extension tables are a memo facility that the algorithm uses both to cut infinite derivation paths for complete evaluation and to optimise the evaluation of logic programs. The original implementation of the ET* algorithm incorporated extension tables as part of the Prolog database using the built-in predicates assert and retract. The advantage of implementing the extension table using the Prolog database is the portability of the ET* algorithm. There are several disadvantages, however, with this approach. One disadvantage is the cost associated with the built-in predicates assert and retract, which are known to be expensive operations in most current Prolog systems. Another disadvantage is the differences across implementations in the semantics that these built-ins provide for dynamic predicates. This paper presents an efficient implementation of extension tables as a global data structure in Prolog, which includes a set of built-in primitives for manipulating the extension table. The ET* algorithm is updated to reflect the utilisation of the global extension table data structure. The implementations of the ET* algorithm are compared using time and space performance on a variety of benchmark programs.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Continuations in Prolog

Continuations are well known in functional programming where they have been used to transform and compile programs. Some languages provide explicit manipulations of the continuation for the user: The user can catch and modify the current continuation. Continuations have also been used in the logic programming context to give a denotational semantics for Prolog, to generate Prolog compilers and ...

متن کامل

Fluents: a Uniform Extension of Kernel Prolog for Reeection and Interoperation with External Objects

We revisit the design of Prolog and propose a simpliied built-in system which provides a uniform interface for controlling multiple interpreters and external stateful objects. On top of a simple kernel (Horn Clause Interpreters with LD-resolution) we introduce Fluents, high level stateful objects which empower and simplify logic programming languages through reeection of the underlying interpet...

متن کامل

Attribute Global Types for Dynamic Checking of Protocols in Logic-based Multiagent Systems

This paper introduces Attribute Global Types, an extension inspired by Attribute Grammars to a formalism we have recently proposed for specifying and dynamically verifying multi-party agent interaction protocols. Global types equipped with attributes are more expressive, since they allow parametric specifications of protocols, but despite their expressive power, they can be still effectively us...

متن کامل

The Design and Implementation of a High-Speed Incremental Portable Prolog Compiler

The design and implementation of a relatively portable Prolog compiler .achieving 12!( LIPS on the standard benchmark is described. The compiler is incremental and uses decompilation to implement retract, clause, and listing, as well as support the needs of its four-port debugger. The system supports modules, garbage collection, database pointers, and a full range of built-ins.

متن کامل

P#: a concurrent Prolog for the .NET framework

SUMMARY We discuss P#, our implementation of a tool which allows interoperation between a concurrent superset of the Prolog programming language and C#. This enables Prolog to be used as a native implementation language for Microsoft's .NET platform. P# compiles a linear logic extension of Prolog to C# source code. We can thus create C# objects from Prolog and use C#'s graphical, networking and...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Softw., Pract. Exper.

دوره 22  شماره 

صفحات  -

تاریخ انتشار 1992